package com.willian.andrappfw.network;


import com.willian.andrappfw.bean.VersionBean;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

public interface WRequests {
    /*
    @POST("/rest/v1/timeZone/selectTimeZoneList")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<SDSelectTimeZoneListBean>>> selectTimeZoneList(@Body SDBaseRequestBody body);

    @POST("/rest/v1/user/getVerifyCode")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> getVerifyCode(@Body SDGetVerifyCodeRequestBody body);

    @POST("/rest/v1/user/register")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> register(@Body SDRegisterRequestBody body);

    //因为找回密码跟注册需要的参数一样，所以用了同一个请求body
    @POST("/rest/v1/user/forgetPassword")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> forgetPassword(@Body SDRegisterRequestBody body);

    //因为登录跟注册需要的参数一样，所以用了同一个请求body
    @POST("/rest/v1/user/login")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<SDLoginBean>> login(@Body SDRegisterRequestBody body);

    @POST("/rest/v1/graphic/selectPage4Notice")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<SDUpAndDownListBean<SDNoticeListItemBean>>> selectPage4Notice(@Body SDGetNoticeRequestBody body);

    @POST("/rest/v1/graphic/selectPage4Course")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<SDUpAndDownListBean<SDCourseListItemBean>>> selectPage4Course(@Body SDGetCourseRequestBody body);

    @POST("/rest/v1/send/selectHoldSend4ApiList")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<SDFirmUpdateListBean>>> selectHoldSend4ApiList(@Body SDFirmwareListBody body);

    @POST("/rest/v1/graphic/selectBanners")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<SDBannersBean>>> selectBanners(@Body SDBaseRequestBody body);

    @POST("/rest/v1/text/saveText")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> saveText(@Body SDSaveTextBody body);

    @POST("/rest/v1/text/saveTextSingle")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> saveTextSingle(@Body SDSaveTextBody body);

    @POST("/rest/v1/error/selectErrors")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<SDDiagnoseErrorBean>>> selectErrors(@Body SDErrorsBody body);

    @POST("/rest/v1/file/upload")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<String>>> upload(@Body MultipartBody body);

    @POST("/rest/v1/feedback/save")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> feedback(@Body SDFeedbackBody body);

    @POST("/rest/v1/user/updateUserNick")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<String>> updateUserNick(@Body SDUpdateNickNameRequestBody body);

    @POST("/rest/v1/country/list")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<SDCountryCodeBean>>> list(@Body SDBaseRequestBody body);

    @POST("/rest/v1/graphic/queryCourseList")
    Observable<com.supersoco.diagnosis.network.SDBaseResponse<List<SDErrorTutorialBean>>> queryCourseList();
 */
    @POST("/rest/v1/version/query")
    Observable<WBaseResponse<VersionBean>> versionQuery();


    /**
     * 下载
     */
    @Streaming //大文件时要加不然会OOM
    @GET
    Call<ResponseBody> downloadFile(@Url String fileUrl);
}
